<h1><code ng:non-bindable="">$anchorScroll</code>
<span class="hint">(service in module <code ng:non-bindable="">ng</code>
)</span>
</h1>
<div><a href="http://github.com/angular/angular.js/edit/master/src/ng/anchorScroll.js"
        class="improve-docs btn btn-primary">Improve this doc</a>

    <h2 id="Description">Description</h2>

    <div class="description">
        <div class="ng-anchorscroll-page"><p>When called, it checks current value of <code>$location.hash()</code> and
            scroll to related element,
            according to rules specified in
            <a href="http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document">Html5 spec</a>.</p>

            <p>It also watches the <code>$location.hash()</code> and scroll whenever it changes to match any anchor.
                This can be disabled by calling <code>$anchorScrollProvider.disableAutoScrolling()</code>.</p></div>
    </div>
    <h2 id="Dependencies">Dependencies</h2>
    <ul class="dependencies">
        <li><code ng:non-bindable=""><a href="api/ng.$window">$window</a></code>
        </li>
        <li><code ng:non-bindable=""><a href="api/ng.$location">$location</a></code>
        </li>
        <li><code ng:non-bindable=""><a href="api/ng.$rootScope">$rootScope</a></code>
        </li>
    </ul>
    <h2 id="Usage">Usage</h2>

    <div class="usage">
        <pre class="prettyprint linenums">$anchorScroll();</pre>
    </div>
</div>
